package com.njtoyo.taxi.admin.service.local_service.merchant;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.mapper.master.entity.local_service.LifeAddress;
import com.njtoyo.taxi.admin.mapper.master.entity.local_service.LifeMerchant;
import com.njtoyo.taxi.admin.rest.presenter.local_service.merchant.LifeAddressPresenter;
import com.njtoyo.taxi.admin.rest.presenter.local_service.merchant.LifeMerchantDetailsPresenter;
import com.njtoyo.taxi.admin.rest.presenter.local_service.merchant.LifeMerchantPagePresenter;
import com.njtoyo.taxi.admin.rest.wrapper.local_service.merchant.*;
import com.njtoyo.taxi.entity.backend.AdminUser;
import com.taxi.entity.common.RestResult;

import java.util.List;

public interface MerchantService {

    /**
     * 所有商户all
     *
     * @param adminUser
     * @return
     */
    RestResult<List<LifeMerchant>> all(AdminUser adminUser);

    /**
     * 司机运营区下商户列表
     *
     * @return
     */
    RestResult<List<LifeMerchant>> allBydriverRegionId(Long  driverRegionId);

    /**
     * 现有商户列表
     *
     * @param adminUser
     * @param wrapper
     * @return
     */
    RestResult<Page<LifeMerchantPagePresenter>> getPage(AdminUser adminUser, LifeMerchantQueryWrapper wrapper);

    /**
     * 现有商户详情
     *
     * @param id
     * @return
     */
    RestResult<LifeMerchantDetailsPresenter> details(Long id);

    /**
     * 添加现有商户
     *
     * @param adminUser
     * @param wrapper
     * @return
     */
    RestResult add(AdminUser adminUser, LifeMerchantAddWrapper wrapper);

    /**
     * 修改现有商户
     *
     * @param wrapper
     * @return
     */
    RestResult update(Long id, LifeMerchantUpdateWrapper wrapper);

    /**
     * 删除现有商户
     *
     * @param id
     * @return
     */
    RestResult delete(Long id);

    /**
     * 自提点列表
     *
     * @param id
     * @return
     */
    RestResult<List<LifeAddress>> getSelfPage(Long id);

    /**
     * 不属于这个商户的自提点列表
     *
     * @param id
     * @return
     */
    RestResult<List<LifeAddress>> noBelongPickup(Long id);

    /**
     * 自提点添加
     *
     * @param id
     * @return
     */
    RestResult addSelf(Long id, PickupLocationAddWrapper wrapper);

    /**
     * 商户添加多个自提点
     *
     * @return
     */
    RestResult addSelfs(Long id, PickupLocationAddsWrapper wrapper);

    /**
     * 获取商户下所有地址的ids，不需要区分自提点和商家地址。
     *
     * @param
     * @return
     */
    RestResult<List<LifeAddressPresenter>> address(Long id);

    /**
     * 自提点分页列表展示
     *
     * @return
     */
    RestResult<Page<LifeAddress>> pickUpPage(AdminUser adminUser, PickupLocationPageWrapper wrapper);

    /**
     * 自提点不分页列表展示
     *
     * @return
     */
    RestResult<List<LifeAddress>> pickUplist(AdminUser adminUser);

    /**
     * 自提点设置
     *
     * @param
     * @return
     */
    RestResult setUp(PickupLocationSetUpAddWrapper wrapper);

}
